class fragments::fonts(
      Array[String] $pkgs_fonts
) {
      # 安装文泉驿字体
      package { $pkgs_fonts:
              ensure => present,
      }
      # 拷贝Monaco字体
      if $::operatingsystem == 'Ubuntu' {
         $ttf_install_dir = '/usr/share/fonts/truetype'
      } else {
         fail("$::operatingsystem is not supported.")
      }
      file { "${ttf_install_dir}/monaco":
           ensure => directory,
           owner => 'root',
           mode => '0755'
      }
      file { "${ttf_install_dir}/monaco/Monaco.ttf":
           ensure => present,
           owner => 'root',
           source => 'puppet:///modules/fragments/Monaco.ttf',
           require => File["${ttf_install_dir}/monaco"]
      }
      # 拷贝微软雅黑字体
      file { "${ttf_install_dir}/msyh":
           ensure => directory,
           owner => 'root',
           mode => '0755'
      }
      file { "${ttf_install_dir}/msyh/msyh.ttc":
           ensure => present,
           owner => 'root',
           source => 'puppet:///modules/fragments/msyh.ttc',
           require => File["${ttf_install_dir}/msyh"]
      }
}